import request from '@/utils/request'
export function fetchDepartmentList() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

export function fetchMangerList() {
  return request({
    url: '/sys/user/simple'
  })
}
export function fetchAddDepart(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
export function fetchUpdateDetail(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
export function fetchDelDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
